<?php
if (!defined('APP_ID')) { die('No direct script access allowed'); }

/**
 * Controller class
 */
abstract class Controller_Template extends Controller {
	protected $_template = '';
	protected $template = null;
	
	public function __before() {
		if (!empty($this->_template)) {
			$this->template = View::factory($this->_template);
		}
	}

	public function __after() {
		if ($this->template instanceof View) {
			Output::body($this->template->render());
		}
	}
}
